import api from '../index'
import urls from './urls'
const header = {
  'Content-Type': 'application/json; charset=utf-8'
}

export default {
  //模板配置
  getTemplate(params) {
    return api.get(urls.getTemplate, params)
  },
  //井配置
  getWellInfo(params) {
    return api.get(urls.getWell, params)
  },
  getwellname() {
    return api.get(urls.getwellname)
  },
  putwell(params){
    return api.put(urls.putwell,params)
  },
  //选择模板类型
  copymodel(params) {
    return api.get(urls.copymodel, params)
  },
  //曲线查看的左侧菜单数据
  getshowlist(params) {
    return api.get(urls.showtemplist, params)
  },
  //平台配置  
  getPlatform (params) {
    return api.get(urls.getPlatform, params)
  },
  addPlatform(params){
    return api.post(urls.addPlatform,params,header)
  },
  editPlatform(params){
    return api.put(urls.editPlatform,params)
  },
  removePlatform (params){
    return api.delete(urls.removePlatform, params)
  },
  // 帮助中心配置
  getHelp (params) {
    return api.get(urls.getHelp, params)
  },
  addHelp(params){
    return api.post(urls.addHelp,params,header)
  },
  editHelp(params){
    return api.put(urls.editHelp,params)
  },
  removeHelp (params){
    return api.delete(urls.removeHelp, params)
  },
  // 作业公司
  getCom (params) {
    return api.get(urls.getCom, params)
  },
  addCom(params){
    return api.post(urls.addCom,params,header)
  },
  editCom(params){
    return api.put(urls.editCom,params)
  },
  removeCom (params){
    return api.delete(urls.removeCom, params)
  },
  companySelect(params) {
    return api.get(urls.comSelect, params)
  },
  // 区块信息
  getBlock (params) {
    return api.get(urls.getBlock, params)
  },
  addBlock(params){
    return api.post(urls.addBlock,params,header)
  },
  editBlock(params){
    return api.put(urls.editBlock,params)
  },
  removeBlock (params){
    return api.delete(urls.removeBlock, params)
  },
  blockSelect(params) {
    return api.get(urls.blockSelect, params)
  },
  // 区域信息
  getArea (params) {
    return api.get(urls.getArea, params)
  },
  addArea(params){
    return api.post(urls.addArea,params,header)
  },
  editArea(params){
    return api.put(urls.editArea,params)
  },
  removeArea (params){
    return api.delete(urls.removeArea, params)
  },
  areaSelect (params){
    return api.get(urls.areaSelect, params)
  },
  //服务器配置
  getServer (params) {
    return api.get(urls.getServer, params)
  },
  addServer(params){
    return api.post(urls.addServer,params,header)
  },
  editServer(params){
    return api.put(urls.editServer,params)
  },
  removeServer (params){
    return api.delete(urls.removeServer, params)
  },
  //曲线单位
  getUnit (params) {
    return api.get(urls.getUnit, params)
  },
  addUnit(params){
    return api.post(urls.addUnit,params,header)
  },
  editUnit(params){
    return api.put(urls.editUnit,params)
  },
  removeUnit (params){
    return api.delete(urls.removeUnit, params)
  },
  unitSelect (params){
    return api.get(urls.unitSelect, params)
  },
  //曲线配置
  getCurve (params) {
    return api.get(urls.getCurve, params)
  },
  addCurve(params){
    return api.post(urls.addCurve,params,header)
  },
  editCurve(params){
    return api.put(urls.editCurve,params)
  },
  removeCurve (params){
    return api.delete(urls.removeCurve, params)
  },
  // getCur (params){
  //   return api.get(urls.getCur, params)
  // },
  getTable (params){
    return api.get(urls.getTable, params)
  },
  getAllFiled(params){
    return api.get(urls.getAllFiled,params)
  },
  //井类型
  welltypeSelect(params) {
    return api.get(urls.welltypeSelect, params)
  },
}